package com.atguigu.juc.order;

import java.util.concurrent.TimeUnit;

public class CodeOrderTest {

    public static void main(String[] args) {

        new Thread(()->{
            try {
                for (int i = 0; i < 10; i++) {
                    TimeUnit.SECONDS.sleep(1);
                    System.out.println("aaa");
                }
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }).start();

        new Thread(()->{
            try {
                for (int i = 0; i < 10; i++) {
                    TimeUnit.SECONDS.sleep(1);
                    System.out.println("bbb");
                }
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }).start();

    }

}
